<li>
  <%= link_to image_tag(photo.public_filename('thumb')), 
              user_photo_path(:user_id => photo.user, :id => photo) %>
</li>
